<template>
  <div>
    <h2>图表1</h2>
    <div class="chart" id="chartDemo">
      图表的容器
    </div>
  </div>
</template>

<script>
import {inject, onMounted} from "vue"
export default {
  name: "EchartsDemo",
  setup(){

    // let $http = inject("axios")
  },
  data(){
    return {
      RememberChart:null,
      myecharts:null,
    }
  },
  created() {
    this.myecharts = inject("echarts");
    this.RememberChart = myecharts.init(document.getElementById("chartDemo"))
    this.RememberChart.setOption({
      xAxis:{

      },
      yAxis:{

      },
      series:[
        {

        }
      ]
    })
  }
}
</script>

<style scoped>
  #chartDemo{
    height: 300px;
    width: 300px;
    border: 1px red solid;
  }
</style>
